package com.joinway.framework.support.adaptor;

import java.sql.Connection;
import java.sql.SQLException;

import javax.sql.DataSource;

import org.springframework.jdbc.datasource.DataSourceUtils;

import com.joinway.framework.data.jdbc.repository.TableRepository;

public class TransactionalTableRepository extends TableRepository {

	public TransactionalTableRepository(Connection connection){
		super(connection);
		throw new UnsupportedOperationException("unsafe to instiate via connection");
	}

	public TransactionalTableRepository(DataSource dataSource) throws SQLException {
		super(DataSourceUtils.getConnection(dataSource));
//		super.getSqlClient().getConnection().setAutoCommit(false);
	}

}
